<?php
!function_exists('zeai_alone') && exit('Forbidden!');
$cook_nickname = gylsubstr($cook_nickname,9,0,"utf-8",false);
?>
<!doctype html><html><head><meta charset="utf-8">
<title>我的-<?php echo $_ZEAI['siteName'];?></title>
<?php echo HEADMETA; ?>
<meta name="generator" content="Zeai.cn V9" />
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>m/css/my_index2.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/my_index.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php
if (is_weixin()){
	require_once ZEAI."api/weixin/jssdk.php";?>
	<script src="<?php echo RES;?>jweixin-1.2.0.js"></script>
	<script>
	wx.config({debug: false,
		appId:'<?php echo $signPackage["appId"];?>',
		timestamp:<?php echo $signPackage["timestamp"];?>,
		nonceStr:'<?php echo $signPackage["nonceStr"];?>',
		signature:'<?php echo $signPackage["signature"];?>',
		jsApiList:['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo']
	});
	</script>
<?php }?>
</head>
<body>
<style>
.appul a i{background-image:-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(<?php echo c16_rgb('#eeeeee');?>,1)  );color:<?php echo $_ZEAI['mob_mbcolor'];?>;}
.col2 a:nth-child(1) em{background-image:-webkit-linear-gradient(135deg,#fc0,#f60)}
.col2 a:nth-child(2) em{background-image:-webkit-linear-gradient(left,rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4),rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,1))}
.col2 .vip{background-image:-webkit-linear-gradient(left,#FD9F23,#ff7e00);}
.col2 .bfbbox{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.04);border-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1)}
.col2 .bfbbox .bfb,header a.qdbtn{background-image:-webkit-linear-gradient(left,rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.5),rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.8))}
</style>
<div class="clear"></div>
<div class="set">
    <a href="<?php echo HOST;?>/m/my_money.php"><i class="ico">&#xe66e;</i></a>
    <a href="<?php echo HOST;?>/m/about.php?t=contact"><i class="ico">&#xe784;</i></a>
    <a href="<?php echo HOST;?>/m/my_set.php"><i class="ico">&#xe6e8;</i></a>
</div>
<header>
	<p><a href="<?php echo a('{"kind":"u","uid":'.$cook_uid.'}');?>"<?php echo $photo_s_hide_cls;?>><?php echo $photo_s_hide_t;?><img src="<?php echo $photo_s_url;?>"></a></p>
	<div class="nickname">
        <h3><span><?php echo $cook_nickname; ?></span><?php echo uicon($cook_sex.$cook_grade,2);?></h3>
        <h6 onClick="zeai.copy(<?php echo $cook_uid; ?>),zeai.msg('复制成功');">相亲ID:<?php echo $cook_uid; ?> <i class="ico">&#xe75c;</i></h6>
    </div>
    <a class="qdbtn"<?php echo($signflag == 1)?' href="javascript:sign();"':'href="javascript:zeai.msg(\'亲，请明天再来签到哦\')"';?>><?php echo($signflag == 1)?'<span id="qdspan"><i class="ico">&#xe64b;</i> 签到</span>':'已签到';?></a>
    <div class="myb">
        <a href="<?php echo HOST;?>/m/my_follow.php"><b><?php echo $gznum;?></b><span>我喜欢的</span></a>
        <a href="<?php echo HOST;?>/m/my_loveb.php"><b><?php echo $cook_loveb;?></b><span>我的<?php echo $_ZEAI['loveB'];?></span></a>
        <a href="<?php echo HOST;?>/m/my_refresh.php"><b><i class="ico ">&#xe69c;</i></b><span>刷新靠前</span></a>
        <a href="<?php echo HOST;?>/m/my_top.php"><b><i class="ico" >&#xe66f;</i></b><span>置顶相亲</span></a>
    </div>
</header>
<div class="col2">
    <a href="<?php echo HOST;?>/m/my_vip.php"><h2><?php echo utitle($cook_grade);?><i class="ico">&#xe601;</i></h2><h6><?php echo($cook_grade>1)?YmdHis($cook_sjtime2,'Ymd').'到期':'开通会员・飞速脱单';?></h6>
        <div class="vip"><?php echo ($cook_grade == 1)?'开通VIP':'提升等级';?></div>
        <em class="ico">&#xe611;</em>
    </a>
    <a href="<?php echo HOST;?>/m/my_info.php"><h2><?php if($cook_dataflag==0){echo '资料审核中';}elseif($cook_dataflag==2){echo '审核未通过';}else{echo ($cook_myinfobfb==100)?'个人资料':'完善资料';}?><i class="ico">&#xe601;</i></h2>
    <h6><?php if($cook_dataflag==0){echo '请等待我们人工审核';}elseif($cook_dataflag==2){echo '请重新修改资料';}else{echo '>90%可被推荐';}?></h6>
    <div class="bfbbox">
    	<?php $bfb_w=($cook_myinfobfb<40)?50:$cook_myinfobfb;?>
        <div class="bfb" style="width:<?php echo $bfb_w;?>%"><?php echo $cook_myinfobfb;?>%</div>
    </div>
    <em class="ico">&#xe65a;</em></a>
</div>
<div class="clear"></div>
<div class="box view">
    <h2>谁看过我
    <a href="<?php echo HOST;?>/m/my_browse.php?t=2" class="more">我看过谁 <i class="ico">&#xe601;</i></a>
    </h2>
    <div class="ivubox" onclick="<?php if ($viewlist[$cook_grade]!=1){?>zeai.openurl('<?php echo HOST;?>/m/my_vip.php');<?php }else{ ?>zeai.openurl('<?php echo HOST;?>/m/my_browse.php');<?php }?>">
    <?php 
    $rt=$db->query("SELECT a.senduid,a.new,a.addtime,b.sex,b.photo_s,b.photo_f,b.photo_ifshow,b.flag FROM ".__TBL_CLICKHISTORY__." a,".__TBL_USER__." b WHERE a.senduid=b.id AND a.uid=".$cook_uid." ORDER BY a.addtime DESC LIMIT 8");
    $total = $db->num_rows($rt);
    if ($total == 0) {
        echo '<br>';
    } else {
        $viewblurClass = ($viewlist[$cook_grade]!=1)?' class="blur"':'';
        for($ii=1;$ii<=$total;$ii++) {
            $rows = $db->fetch_array($rt,'name');
            if(!$rows) break;
            $senduid = $rows['senduid'];
            $sex     = $rows['sex'];
            $new     = $rows['new'];
            $new_str = ($new == 1)?'<b></b>':'';
            $photo_s  = $rows['photo_s'];
            $photo_f  = $rows['photo_f'];
            $photo_ifshow  = $rows['photo_ifshow'];
            $uflag  = $rows['flag'];
			$photo_s_url=photo_s_out('{"sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');			
            echo '<span><img src="'.$photo_s_url.'"'.$viewblurClass.'></span>';
        }
    }
    if ($viewlist[$cook_grade]!=1){
        $urole = json_decode($_ZEAI['urole']);
        if (count($urole) >= 1 && is_array($urole)){
            foreach ($urole as $uc) {
                $cgrade = $uc->g;
                if($viewlist[$cgrade] == 1){
                    $maxgradeT=utitle($cgrade);
                    break;
                }
            }
        }
        $maxgradeT = ($cook_grade==1)?'点击开通VIP查看':'点击升级'.$maxgradeT.'查看';
    }?>
    </div>
    <h5>
    	<?php
		$vwnum = $db->COUNT(__TBL_CLICKHISTORY__,"uid=".$cook_uid);		
		if ($vwnum > 0){?>
    	最近有<b><?php echo $vwnum;?></b>人看过你<?php if ($viewlist[$cook_grade]!=1){?>，<font style="color:#FF6F6F" onclick="zeai.openurl('<?php echo HOST;?>/m/my_vip.php')"><?php echo $maxgradeT;?></font><?php }?>
    	<?php }else{ ?>
        暂时还没有人看过你　<a href="my_refresh.php">刷新靠前</a>
        <?php }?>
    </h5>
    <div class="clear"></div>
</div>
<?php
//认证中心
$rz_dataARR = explode(',',$_ZEAI['rz_data']);
if (count($rz_dataARR)>0 && is_array($rz_dataARR)){
    function RZchkFlag($objstr,$RZarr) {
        global $cook_uid,$db;
        if (!in_array($objstr,$RZarr)){
            $doing = $db->COUNT(__TBL_RZ__,"uid=".$cook_uid." AND rzid='$objstr' AND flag=0");
            if ($doing>0)return '<h5>审核中</h5>';
        }else{
            return '';
        }
    }?>
    <div class="box cert" id="cert">
        <h2>诚信认证<a href="my_cert.php" class="more"><i class="ico">&#xe601;</i></a></h2>
        <ul class="my_cert">
            <?php
                foreach ($rz_dataARR as $k=>$V){?>
                <li onClick="zeai.openurl('my_cert.php?t=<?php echo $V;?>')" id="<?php echo $V;?>" class="rz<?php echo (in_array($V,$RZarr))?' ed':'';?>"><i class="ico <?php echo $V;?>"<?php echo (in_array($V,$RZarr))?RZbg($V):'';?>><?php echo rz_data_info($V,'ico');?></i><h3><?php echo rz_data_info($V,'title');?></h3><?php echo RZchkFlag($V,$RZarr);?></li>
            <?php }?>
            <div class="clear"></div>
        </ul>
        <div class="morebox"><i class="ico off morebtn" onClick="morebtn(this,cert,'16rem');">&#xe60b;</i></div>
    </div>
    <?php
}
$rtt2=$db->query("SELECT COUNT(*) FROM ".__TBL_HH__." a,".__TBL_USER__." b WHERE a.uid=".$cook_uid." AND a.senduid=b.id AND a.ifagree=0");
$roww2 = $db->fetch_array($rtt2,'num');
$b_hh=$roww2[0];
$b_hh = ($b_hh>0)?'<b>'.$b_hh.'</b>':'';?>
<div class="box ">
	<h2>我的相亲</h2>
    <div class="appul">
    	<?php if(@in_array('sign',$navarr)){?><a href="<?php echo HOST;?>/m/my_sign.php"><i class="ico sign">&#xe699;<b>签字</b></i><span>承诺书</span></a><?php }?>
		<?php if(@in_array('hn',$navarr)){?><a href="<?php echo HOST;?>/m/my_hongniang.php"><i class="ico hn">&#xe613;<b>人工</b></i><span>专属红娘</span></a><?php }?>
		<?php if(@in_array('tg',$navarr)){?><a href="<?php echo HOST;?>/m/tg_my.php"><i class="ico tg">&#xe61d;<b>赚钱</b></i><span><?php echo $TG_set['navtitle'];?></span></a><?php }?>
        <?php if(@in_array('contact_hh',$navarr)){?><a href="<?php echo HOST;?>/m/my_huhuan.php"><i class="ico ask">&#xe691;</i><span>互换</span><?php echo $b_hh;?></a><?php }?>
    	<a href="<?php echo HOST;?>/m/my_mateshow.php"><i class="ico match">&#xe8ab;</i><span>配对</span></a>
    	<?php if(@in_array('xqcard',$navarr)){?><a href="<?php echo a('{"kind":"card"}');?>"><i class="ico xqk">&#xe6b6;</i><span>相亲卡</span></a><?php }?>
    	<?php if(@in_array('video',$navarr)){?><a href="<?php echo HOST;?>/m/my_video.php"><i class="ico video">&#xe68a;</i><span>视频</span></a><?php }?>
    	<a href="<?php echo HOST;?>/m/my_photo.php"><i class="ico photo">&#xe648;</i><span>相册</span></a>
    	<?php if(@in_array('gift',$navarr)){?><a href="<?php echo HOST;?>/m/my_gift.php"><i class="ico gift">&#xe600;</i><span>礼物</span></a><?php }?>
    	
    </div>
    <div class="clear"></div>
</div>
<?php if ($signflag == 1){?>
<div id="mask_sign" class='alpha0_100'><div class="gif rotate" id="mask_gif"></div></div>
<div id="signokbox" class="scale">
	<div class="signok">
		<h1>好手气</h1>
		<div class="hr"></div>
		<h4>获得<font id="randloveb">0</font>个<?php echo $_ZEAI['loveB'];?></h4>
	</div>
</div>
<script>
o('mask_sign').onclick = function(){ZEAI_signclose();}
o('signokbox').onclick = function(){ZEAI_signclose();}
function ZEAI_signclose(){zeai.showSwitch('mask_sign,signokbox');}
function sign(){
	zeai.ajax({'url':'my_loveb'+zeai.extname,'data':{submitok:'ajax_sign'}},function(e){var rs=zeai.jsoneval(e);
		if (rs.flag==1){
			zeai.showSwitch('mask_sign,signokbox,mask_gif');
			randloveb.html(rs.num);
			qdspan.html('已签到');
		}else{zeai.msg(rs.msg);}
	});	
}
</script>
<?php }
if($cook_ifadm==1)echo '<a href="'.$_ZEAI['adm2'].'/m_login.php" class="ifadm">后台<br>管理</a>';
require_once ZEAI.'m/bottom2.php';
if (is_weixin() && !empty($_GZH['wx_gzh_ewm']) && $cook_subscribe!=1){
	@wx_endurl('您刚刚浏览的页面【我的】',a('{"kind":"my","mp":"mob"}'));
	if (ifint($if_other_login_subscribe)){?>
		<script>zeai.msg('当前微信号已被其它帐号（会员ID：<?php echo $if_other_login_subscribe;?>）绑定，请退出使用微信登录',{time:5});/*setScrollTop(0);*/o('main').scrollTop=1000;</script><?php
	}else{?>
		<div id="subscribe_box" class="my-subscribe_box"><img src="<?php echo UP.$_GZH['wx_gzh_ewm']; ?>?<?php echo $_ZEAI['cache_str'];?>"><h3>长按二维码关注公众号<br>获取帐号消息通知等全功能体验<br>关注成功之后将不再弹出</h3></div>
		<script>setTimeout(function(){ZeaiM.div({obj:subscribe_box,w:26,h:30});},500);</script><?php
	}?>
<?php }else{
	//蹦
	$bounce=json_decode($_ZEAI['bounce'],true);
	if($bounce['flag']['vipdatarz'] == 1 && (!empty($cook_openid) || ifint($cook_uid))){
		$bouncev = '';
		$bounceTip = 'cook_my_bounce'.YmdHis(ADDTIME,'d');
		if(empty($bouncev) && ($cook_myinfobfb<$force_data_bfb || empty($cook_photo_s)  ) && $_COOKIE[$bounceTip.'my_info'] != 'my_info' && !empty($bounce['my_info_picurl']) ){
			$bouncev='my_info';$url=mHref('my_info');$picurl=UP.$bounce['my_info_picurl'];
		}
		if(empty($bouncev) && !in_array('identity',$RZarr) && $_COOKIE[$bounceTip.'my_rz'] != 'my_rz'  && !empty($bounce['rz_picurl']) ){
			$bouncev='my_rz';$url=mHref('cert');$picurl=UP.$bounce['rz_picurl'];
		}
		if(!empty($bouncev)){
			$bounceTip = $bounceTip.$bouncev;
			if($_COOKIE[$bounceTip] != $bouncev){
				setcookie($bounceTip,$bouncev,null,"/",$_ZEAI['CookDomain']);
				?>
				<script>var my_divclose;setTimeout(function(){my_divclose=ZeaiM.div_pic({obj:my_bounce_box,w:32,h:36});},1500);</script>
				<div id="my_bounce_box" class="bounce_box bounce"><img style="width:100%;display:block" src="<?php echo $picurl;?>" onClick="my_divclose.click();if(zeai.empty(o('my_info')) && zeai.empty(o('my_rz'))  )zeai.openurl('<?php echo $url;?>');"></div>
				<?php
			}
		}
	}
}
$db->query("UPDATE ".__TBL_USER__." SET endtime=".ADDTIME." WHERE id=".$cook_uid);
if ($ifWeixinPushInfo == 1)wx_sent_kf_PushInfo($cook_openid);
ob_end_flush();?>